package com.evan.common.constant;

import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.Hashtable;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Bitmap;
import android.view.View;

@SuppressLint("UseSparseArrays")
public class Constant {

	// store device width in global
	public static float WIDTH = 0;
	public static float HEIGHT = 0;
	public static float DEVICE_RATE = 0.f;
	public static final String SHAREPREFERENCE = "share_pref";
	public static final String SHAREPREFERENCE_IDENTITY_LAST_VERSION_CODE = "sharepreference_identity_last_version_code";
	public static final String SHAREPREFERENCE_IDENTITY_CURRENT_VERSION_CODE = "sharepreference_identity_current_version_code";

	public static final String SPACE = " ";
	public static final String NOFRIEND = "没朋友······";
	public static final String CONTENT_EMPTY = "空空如也······";
	public static final String CONTENT_EXCEPTION = "数据太胖，加载不动了······";
	// intent key
	public static final String IDENTITY_KEY = "identity_key";
	public static final String IDENTITY_THEME = "identity_theme";
	public static final String IDENTITY_FILEPATH = "identity_filepath";
	public static final String IDENTITY_NET_IMG = "identity_net_img";
	public static final String IDENTITY_DATA_JSONOBJECT = "identity_data_jsonobject";
	public static final String IDENTITY_POSITION = "identity_position";

	// response code
	public static final String RESPONSE_SUCCESS = "success";
	public static final String RESPONSE_FAIL = "fail";
	public static final String KEY_TREATMENT = "treatment";
	// activity result code
	public static final int ACTIVITYRESUTECODE = 0x100;
	public static final int ACTIVITY_CHOOSEFILE_CODE = 0x101;

	public static final String LOADING_IMG_FAIL_CODE = "0x101010";

	// images cache
	public static final Hashtable<String, SoftReference<Bitmap>> imagesCache = new Hashtable<String, SoftReference<Bitmap>>(); // 图片缓存
	// public static final Hashtable<String, WeakReference<Bitmap>> imagesCache
	// = new Hashtable<String, WeakReference<Bitmap>>(); // 图片缓存

	public static final HashMap<String, Activity> activitys = new HashMap<String, Activity>();

	public static final HashMap<Integer, View> fragments = new HashMap<Integer, View>();

	// public static String identity;

	public static final String SHARE_GUIDE = "share_guide";

}
